package com.cqndt.disaster.device.dao;

import java.util.Map;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.cqndt.disaster.device.vo.SearchVo;

@Mapper
public interface AppTabDeviceMapper {
    /**
     * @param userId
     * @return 设备总数
     **/
    Integer selectCountDevice(@Param("userId")String userId);
    /**
     * @param userId 当前用户
     * @param offlineTime 离线时间
     * @return 该用户设备在线数量
     **/
    Integer countDeviceStateZx(@Param("userId")String userId,@Param("offlineTime")Integer offlineTime);
    /**
     * @param userId
     * @param offlineTime
     * @return 该用户设备离线数量
     **/
    Integer countDeviceStateLx(@Param("userId")String userId,@Param("offlineTime")Integer offlineTime);
    /**
     * @param userId
     * @param offlineTime
     * @param seachText
     * @return 项目设备在线情况
     **/
    List<Map<String, Object>> selectOnlineRateByProject(@Param("userId") String userId,@Param("offlineTime")Integer offlineTime,@Param("seachText")String seachText);

    List<Map<String, Object>> selectOnlineDeviceByProjectID(@Param("projectId") Integer projectId, @Param("offlineTime") Integer offlineTime);

    List<Map<String, Object>> selectPerson(@Param("projectId") Integer projectId);

    Map<String, Object> selectDeviceById(@Param("deviceId") int deviceId, @Param("offlineTime") Integer offlineTime);

    List<Map<String, Object>> deviceCoordinateByProjectId(@Param("id") int id);

    List<Map<String, Object>> selectDeviceTypeStatistics(@Param("userId") String userId);

    Integer selectDeviceTypeStatisticsTotal(@Param("userId") String userId);

    List<Map<String, Object>> selectProjectByDeviceType(@Param("userId") String userId, @Param("deviceTypeId") String deviceTypeId, @Param("projectName") String projectName);

    Integer selectProjectByDeviceTypeCount(@Param("userId") String userId, @Param("deviceTypeId") String deviceTypeId, @Param("projectName") String projectName);

    List<Map<String, Object>> projectByDeviceTypeAndId(@Param("deviceTypeId") String deviceTypeId, @Param("projectId") String projectId);

    List<Map<String,Object>> listTabSensor(@Param("deviceId") String deviceId);

    List<Map<String,Object>> tbsYl(SearchVo vo);
    
    List<Map<String,Object>> tbsBmwy(SearchVo vo);
    
    List<Map<String,Object>> tbsGnss(SearchVo vo);
    
    List<Map<String,Object>> tbsSbwy(SearchVo vo);
}